from django.contrib import admin
from .models import essay, Tag, classification, Student,user_info


# Register your models here.


# class UsersAdmin(admin.ModelAdmin):
#     list_display = ('uid', 'account', 'password', 'identity', 'assets', 'Username', 'Phonenumber', 'realname')
#     list_per_page = 10
#     search_fields = ('uid', 'account', 'Username', 'Phonenumber', 'realname')
#     fields = ('account', 'identity', 'assets', 'Username', 'Phonenumber', 'realname')
#     list_display_links = ('account', 'Username', 'Phonenumber', 'realname')
#     list_filter = ('uid', 'password', 'realname')
#
#
# class TagAdmin(admin.ModelAdmin):
#     list_display = ('id', 'name',)
#     fields = ('name',)
#     list_per_page = 10
#     search_fields = ('name',)
#     list_display_links = ('name',)

class essayAdmin(admin.ModelAdmin):
    fields = ('title', 'classifier', 'tag', 'author', 'content')


class classifierAdmin(admin.ModelAdmin):
    list_display = ("name",)
    fields = ("name",)
    list_display_links = ("name",)
    list_per_page = 10
    search_fields = ("name",)


admin.site.register(essay, essayAdmin)
admin.site.register(Tag)
admin.site.register(classification, classifierAdmin)
admin.site.register(Student)
admin.site.register(user_info)